<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>

<script>
    let jsObj={
        name:"张三",
        age:18,
        speak(){
            console.log(jsonObj.name + "说：今天天气真好！");
        }
        ,date :new Date()
    }

    console.log(jsonObj.name);
    console.log(jsonObj.speak());
    //文本信息
    let jsonObj={
        name:"徐飞",
        age:18,
        son:{
            name:"秦家龙",
            age:10,
        },
        hobby:["smoke","drink"],
         married:true
    }


    let j1 = {
        name : "wangwu",
        age : 18
    }
    console.log(j1.name); //wangwu
    let j2 = ["smoke","drink","firehead"]
    console.log(j2[1]);// drink
    let j3 = [
        {
            name : "wangwu",
            age : 18
        },
        {
            name : "maliu",
            age : 19
        }
    ]
    console.log(j3[1].name);//maliu
    let j4 =  {
        name : "李四",
        age : 19,
        son : {
            name : "狗蛋",
            age : 3
        },
        hobby : ["smoke","drink"],
        married : true
    }
    console.log(j4.hobby[0]); // smoke

</script>
</html>